import Mock from 'mockjs2'
import { builder } from '../util'

const userList = (options) => {
  return builder({
    'data': [],
    'pageSize': 10,
    'pageNo': 0,
    'totalPage': 1,
    'totalCount': 0
  })
}

const departmentList = () => {
  return builder({
    'data': [],
    'pageSize': 10,
    'pageNo': 0,
    'totalPage': 1,
    'totalCount': 0
  })
}

const roleList = () => {
  return builder({
    'data': [{}],
    'pageSize': 10,
    'pageNo': 0,
    'totalPage': 1,
    'totalCount': 0
  })
}

const menuList = () => {
  return builder({
    'data': [{}],
    'pageSize': 10,
    'pageNo': 0,
    'totalPage': 1,
    'totalCount': 0
  })
}

const parameterList = () => {
  return builder({
    'data': [
      {
        'name': '职业',
        'key': 'ZHIYE',
        'desc': '',
        'status': 1,
        'createTime': '2022-07-27'
      }
    ],
    'pageSize': 10,
    'pageNo': 0,
    'totalPage': 1,
    'totalCount': 0
  })
}

const smsList = () => {
  return builder({
    'data': [],
    'pageSize': 10,
    'pageNo': 0,
    'totalPage': 1,
    'totalCount': 0
  })
}

const accessList = () => {
  return builder({
    'data': [],
    'pageSize': 10,
    'pageNo': 0,
    'totalPage': 1,
    'totalCount': 0
  })
}

const operationList = () => {
  return builder({
    'data': [],
    'pageSize': 10,
    'pageNo': 0,
    'totalPage': 1,
    'totalCount': 0
  })
}

Mock.mock(/\/mock\/system\/user/, 'get', userList)
Mock.mock(/\/mock\/system\/department/, 'get', departmentList)
Mock.mock(/\/mock\/system\/role/, 'get', roleList)
Mock.mock(/\/mock\/system\/menu/, 'get', menuList)
Mock.mock(/\/mock\/system\/parameter/, 'get', parameterList)
Mock.mock(/\/mock\/system\/sms/, 'get', smsList)
Mock.mock(/\/mock\/system\/access/, 'get', accessList)
Mock.mock(/\/mock\/system\/operation/, 'get', operationList)
